<template>
    <div class="main">
        <div class="content">
            <div class="breadcrumb">
                <div class="title">当前位置：</div>
                <el-breadcrumb separator="/">
                    <el-breadcrumb-item><a href="/admin">首页</a></el-breadcrumb-item>
                    <el-breadcrumb-item><a href="/personnel/list">员工</a></el-breadcrumb-item>
                    <el-breadcrumb-item>员工列表</el-breadcrumb-item>
                </el-breadcrumb>
            </div>
            <div class="cont">
                <div class="title">
                    <el-button type="primary" size="mini">+添加店员</el-button>
                    <div class="right">
                        
                        <div class="item">
                            <el-select v-model="type" placeholder="状态">
                                <el-option label="分类" :value="1"></el-option>
                                <el-option label="分类1" :value="2"></el-option>
                            </el-select>
                        </div>
                        <div class="item">
                            <el-input placeholder="店员姓名/用户名/手机号/店员昵称" v-model="type" class="input-with-select">
                                <el-button slot="append" icon="el-icon-search"></el-button>
                            </el-input>
                        </div>
                    </div>
                </div>
                <el-table
                    :data="tableData"
                    style="width: 100%"
                    @selection-change="handleSelectionChange"
                >
                    <el-table-column type="selection" width="55"></el-table-column>
                    <el-table-column prop="date" label="店员"></el-table-column>
                    <el-table-column prop="date" label="姓名"></el-table-column>
                    <el-table-column prop="date" label="业绩收益比例"></el-table-column>
                    <el-table-column prop="date" label="状态"></el-table-column>
                    <el-table-column label="操作">
                        <template slot-scope="scope">
                            <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                            <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <div class="type">
                    <el-button size="mini" type="primary" icon="el-icon-circle-check">启用</el-button>
                    <el-button size="mini" type="primary" icon="el-icon-circle-close">禁用</el-button>
                    <el-button size="mini" type="primary" icon="el-icon-delete">删除</el-button>
                </div>
                <div class="page">
                    <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="currentPage"
                    :page-sizes="[10, 50, 100, 200]"
                    :page-size="pageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="total">
                    </el-pagination>
                </div>
            </div>
        </div>

    </div>
</template>
<script>
export default {
    data(){
        return{
            tableData:[{date:1}],
            currentPage:1,//当前分页
            pageSize:10,//分页数量
            total:0,//数据总数
            type:''
        }
    },
    mounted(){
        
    },
    computed:{
        
    },
    methods:{
        //当前页面数据量改变
        handleSizeChange(val) {
            console.log(`每页 ${val} 条`);
        },
        //翻页
        handleCurrentChange(val) {
            console.log(`当前页: ${val}`);
        },
        //编辑
        handleEdit(index, row) {
            console.log(index, row);
        },
        //删除
        handleDelete(index, row) {
            console.log(index, row);
        },
        //当前选中项
        handleSelectionChange(val) {
            console.log(val);
        }
    }
}
</script>
<style lang="scss" scoped>
    .main{
        display: flex;
        .content{
            padding: 20px;
            width: 100%;
            .breadcrumb{
                display: flex;
                align-items: center;
            }
            .cont{
                padding: 20px 30px;
                background-color: #ffffff;
                margin-top: 15px;
                box-sizing: border-box;
                .title{
                    display: flex;
                    justify-content: space-between;
                    width: 100%;
                    .right{
                        display: flex;
                        justify-content: flex-end;
                        width: 800px;
                        .item{
                            margin: 0 5px;
                        }
                    }
                }
                .type{
                    padding: 20px 0;
                }
                .page{
                    text-align: center;
                    padding: 20px 0;
                }
            }
        }
    }
</style>